#ifndef POPUP_PROMPT_DIALOG_HPP
#define POPUP_PROMPT_DIALOG_HPP

#include <QtGui>
#include <PopupLibTypes.hpp>
#include <PopupThreadWidget.hpp>
#include "ui_promptdialog.h"

struct PopupPromptDialog : public QDialog, private Ui_PromptDialog
{
  Q_OBJECT

public:
  PopupPromptDialog(QWidget *p_parent = 0);
  virtual ~PopupPromptDialog() {}
  void show(const Popup::UserMessage *p_message,
            PopupThreadWidget *p_widget);

signals:
  void signal_messageAccepted(const Popup::UserMessage *p_message,
                              PopupThreadWidget *p_widget);
  void signal_messageRefused(const Popup::UserMessage *p_message,
                             PopupThreadWidget *p_widget);

protected:
  // Overrides
  virtual void showEvent(QShowEvent*);
  virtual void hideEvent(QHideEvent*);

private slots:
  void slot_chicoree();
  void slot_certainlyNot();

private:
  const Popup::UserMessage *m_currentMessage;
  PopupThreadWidget *m_currentWidget;
  QPoint m_lastPosition;
};

#endif // POPUP_PROMPT_DIALOG_HPP
